package com.yohann.designPattern.factory.factoryMethod.factory;

import com.yohann.designPattern.factory.factoryMethod.pizza.BeijingCheesePizza;
import com.yohann.designPattern.factory.factoryMethod.pizza.BeijingPepperPizza;
import com.yohann.designPattern.factory.factoryMethod.pizza.LondonPepperPizza;
import com.yohann.designPattern.factory.simpleFactory.pizza.Pizza;

/**
 * <p>
 * 北京奶酪工厂
 * </p>
 *
 * @author Yohann
 * @since 2021/2/1 20:56
 */
public class BeijingFactory extends BaseFactory {
    @Override
    Pizza createPizza(String type) {
        Pizza pizza = null;
        if (type.equals("cheese")) {
            pizza = new BeijingCheesePizza();
        } else if (type.equals("pepper")) {
            pizza = new BeijingPepperPizza();
        }

        return pizza;
    }
}